1. Field of the Invention
The present invention relates to an electronic apparatus with non-volatile memory and writing method thereof, and more particularly, to a method and apparatus for writing time-relevant data of the same time unit to different memory blocks of the nonvolatile memory of the electronic apparatus.
2. Description of Related Art
An electronic apparatus of a projection display device, for example, requires writing operation to a block of a non-volatile memory every minute, yet counts for writing data to specific memory block of a nonvolatile memory are limited. It is thus desirable to develop a method and apparatus that provide nonvolatile memory with more writing time without sacrificing writing frequency.
Referring to FIG. 1, it illustrates a schematic flowchart diagram of a conventional implementation method for writing time-relevant data to a nonvolatile memory of an electronic apparatus. A projection display device is exemplary hereinafter, wherein the apparatus comprises a controller, a nonvolatile memory and power supply.
The steps for writing a nonvolatile memory of the projection display device comprise turning on the projection display device (S302), the controller clocking an offset time (S304), and the controller determining whether the offset time is longer than the heat radiation time (S306). If the offset time is shorter than the heat radiation time, the controller continues to clock the offset time (S312). Yet if the offset time is longer than the heat radiation time, the controller increments 1 to the offset time (S308), and writes the offset time incremented with 1 to a specific address of the nonvolatile memory (S310), then proceeds to clock the offset time (S312).
In a conventional projection display device, the blocks of the nonvolatile memory provides merely an hourly memory block and a minutely memory block for time-relevant data. Therefore, when the heat radiation time of the projection display device is set at 1 minute, that is, the controller writes the minute blocks of the nonvolatile memory one time every minute.
If a writing time limitation of a specific minutely block address of the nonvolatile memory is 100 thousand times, the writing time limit of the nonvolatile memory is merely 100000/175200=0.57 year. Whereas if a writing time limitation is one million times, the writing time limit of the nonvolatile memory is 1000000/175200=5.7 years. The above data indicates that the nonvolatile memory of the projection display device, or even the device itself needs to be replaced after being used for a period of time.
According to the above descriptions, time-relevant data is written to specific addresses of blocks of the nonvolatile memory according to the conventional method for writing a nonvolatile memory of an electronic apparatus. If the electronic apparatus runs for 8 hours a day, the controller then writes the nonvolatile memory 480 times per day.
After a year (365 days), the controller writes the non-volatile memory for 175200 times, which might damage the nonvolatile memory or even the projection display device itself substantially.